Hey,

I m doing a image processing project. I need to find the median in a 2d matrix.

What is the another way, instead of saving elements in 1d array, sort and then find median.